class Councillor < ActiveRecord::Base
  belongs_to :address
  belongs_to :party
  belongs_to :ward
  has_many :committee_memberships
  has_many :committees, :through => :committee_memberships
  
  has_many :meeting_attendees
  has_many :councillors, :through => :meeting_attendees
  
  validates_presence_of :ward_id  
  
  def full_name
    rval = ""
    rval = rval + self.first_name unless self.first_name.nil?
    rval = rval + " " + self.last_name unless self.last_name.nil?
    return rval
  end
  
end
